import 'package:flutter/material.dart';
class MyButton extends StatelessWidget {
  final String text;
  final String path;
  final pressed;
  final arguments;
  const MyButton({this.arguments,this.text,this.path,this.pressed = null});
  @override
  Widget build(BuildContext context) {
    return Row( 
        children: <Widget>[
          Expanded(
          child: Container(
          margin: EdgeInsets.all(10), 
          height: 50,
          child: RaisedButton(
              child: Text(this.text),
              color: Colors.blue,
              textColor: Colors.white,
              onPressed: (){
                return this.pressed == null ? Navigator.pushNamed(context,this.path,arguments:this.arguments) : this.pressed();
              }
            ),
          ),
          )
        ],
      );
  } 
}